<template>
  <div class="box">
      <h2>父组件</h2>
      <!-- 1. 通过在子组件身上 以自定义属性的方式进行传递 数据 -->
      <v-child a="my is a" b="20"></v-child>
      <v-child a="aa" b="30"></v-child>

      <v-child :a="age"></v-child>
      <v-child :age="age" :username="username"></v-child>
  </div>
</template>

<script>

import vChild from './child.vue'

export default {
  components:{
    vChild
  },
  data(){
    return {
      age:15,
      username:'张三'
    }
  }
}
</script>

<style scoped>

</style>